import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Index from '../views/Index.vue'
import User from '../views/User.vue'
import Section from '../views/Section.vue'
import MyFocus from '../views/MyFocus.vue'
import MyCollect from '../views/MyCollect.vue'
import MyFollow from '../views/MyFollow.vue'
import MyEdit from '../views/MyEdit.vue'
import Search from '../views/Search.vue'
import News from '../views/News.vue'
import Test from '../views/Test.vue'
import MoreComment from '../views/MoreComment.vue'


Vue.use(VueRouter)

  const routes = [
    {path:'/',redirect:'/login'},//重定向首页
    {path:'/user',component:User},//个人中心
    {path:'/index',component:Index},//首页
    {path:'/login',component:Login},//登陆
    {path:'/register',component:Register},//注册
    {path:'/section',component:Section},//栏目管理
    {path:'/focus',component:MyFocus},//我的关注
    {path:'/collect',component:MyCollect},//我的收藏
    {path:'/follow',component:MyFollow},//我的跟帖
    {path:'/edit',component:MyEdit},//编辑资料
    {path:'/search',component:Search},//搜索页面
    {path:'/news/:id',component:News},//新闻详细
    {path:'/test',component:Test},//测试
    {path:'/moreComment/:id',component:MoreComment},//更多跟帖
    
]

const router = new VueRouter({
  routes
})

export default router
